#include "gtest/gtest.h"

//#include "../include/Tools.h"
#include "Tools.h"

//using namespace SG::DataStructure::Math;
using namespace SG::Algebra;

TEST (MathToolsTest, calcTriArea)
{
    Point point1;
    point1.m_x = 1;
    point1.m_y = 0;
    point1.m_z = 0;
    Point point2;
    point2.m_x = 0;
    point2.m_y = 1;
    point2.m_z = 0;
    Point point3;
    point3.m_x = 0;
    point3.m_y = 0;
    point3.m_z = 1;
    Vector3D normal;
    Real_t     area = calcTriArea (point1, point2, point3, normal);

    Real_t areaTarget = sqrt (3) / 2;

    ASSERT_NEAR (area, areaTarget, TOLERANCE);
}